package bg.cinema_system.service;

import java.sql.SQLException;
import java.text.ParseException;

import bg.cinema_system.DAO.UserDAO;
import bg.cinema_system.pojo.Movie;
import bg.cinema_system.pojo.Projection;
import bg.cinema_system.pojo.User;

public class UserServeice {

	public static User isUserExist(String username, String password)
			throws SQLException {
		return UserDAO.isUserExist(username, password);
	}

	public static boolean createNewUser(User user) throws SQLException {
		return UserDAO.createNewUser(user);
	}

	public static void changePassword(int userId, String password)
			throws SQLException {
		UserDAO.changePassword(userId, password);
	}

	public static boolean checkPassword(int userId, String password)
			throws SQLException {
		return UserDAO.checkPassword(userId, password);
	}

	public static void insertMovie(Movie moviePojo) throws SQLException,
			ParseException {
		UserDAO.insertMovie(moviePojo);
	}

	public static void insertProjection(Projection projection)
			throws SQLException, ParseException {
		UserDAO.insertProjection(projection);

	}

}
